/*
 * test1
 */
package com.pitop.market.entity;

/**
 * 维修记录 的实体类的状态
 *
 * @author test1
 */
public enum MarketRepairRecordState implements java.io.Serializable {
    //枚举定义在此
    General_Fault("一般故障修复"),
    Replace_Parts("更换配件修复"),
    Return_Factory("需要返厂故障"),
    Broken("无法修复故障"),;

    public String val;

    MarketRepairRecordState(String val) {
        this.val = val;
    }

    MarketRepairRecordState() {

    }

    /**
     * 根据状态名称查询状态
     *
     * @param stateName
     * @return
     */
    public static MarketRepairRecordState getEnum(String stateName) {
        for (MarketRepairRecordState marketRepairRecordState : MarketRepairRecordState.values()) {
            if (marketRepairRecordState.name().equalsIgnoreCase(stateName)) {
                return marketRepairRecordState;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return this.name();
    }

}
